<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gnome-vfs-utils</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library">
<link rel="up" href="data-types.html" title="Basic Data Types">
<link rel="prev" href="gnome-vfs-2.0-gnome-vfs-uri.html" title="GnomeVFSURI">
<link rel="next" href="gnome-vfs-2.0-gnome-vfs-file-info.html" title="GnomeVFSFileInfo">
<meta name="generator" content="GTK-Doc V1.15.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gnome-vfs-2.0-gnome-vfs-uri.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="data-types.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th>
<td><a accesskey="n" href="gnome-vfs-2.0-gnome-vfs-file-info.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gnome-vfs-2.0-gnome-vfs-utils.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gnome-vfs-2.0-gnome-vfs-utils.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gnome-vfs-2.0-gnome-vfs-utils"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gnome-vfs-2.0-gnome-vfs-utils.top_of_page"></a>gnome-vfs-utils</span></h2>
<p>gnome-vfs-utils — various utilities functions to manipulate uris</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gnome-vfs-2.0-gnome-vfs-utils.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">enum                <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GnomeVFSMakeURIDirs" title="enum GnomeVFSMakeURIDirs">GnomeVFSMakeURIDirs</a>;
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-format-file-size-for-display" title="gnome_vfs_format_file_size_for_display ()">gnome_vfs_format_file_size_for_display</a>
                                                        (<em class="parameter"><code><a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a> size</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-format-uri-for-display" title="gnome_vfs_format_uri_for_display ()">gnome_vfs_format_uri_for_display</a>    (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="returnvalue">GnomeVFSResult</span></a>      <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-url-show" title="gnome_vfs_url_show ()">gnome_vfs_url_show</a>                  (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>);
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="returnvalue">GnomeVFSResult</span></a>      <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-url-show-with-env" title="gnome_vfs_url_show_with_env ()">gnome_vfs_url_show_with_env</a>         (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **envp</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-escape-string" title="gnome_vfs_escape_string ()">gnome_vfs_escape_string</a>             (<em class="parameter"><code>const <span class="type">char</span> *string</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-escape-path-string" title="gnome_vfs_escape_path_string ()">gnome_vfs_escape_path_string</a>        (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-escape-host-and-path-string" title="gnome_vfs_escape_host_and_path_string ()">gnome_vfs_escape_host_and_path_string</a>
                                                        (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-escape-slashes" title="gnome_vfs_escape_slashes ()">gnome_vfs_escape_slashes</a>            (<em class="parameter"><code>const <span class="type">char</span> *string</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-escape-set" title="gnome_vfs_escape_set ()">gnome_vfs_escape_set</a>                (<em class="parameter"><code>const <span class="type">char</span> *string</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *match_set</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-unescape-string" title="gnome_vfs_unescape_string ()">gnome_vfs_unescape_string</a>           (<em class="parameter"><code>const <span class="type">char</span> *escaped_string</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *illegal_characters</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-canonical" title="gnome_vfs_make_uri_canonical ()">gnome_vfs_make_uri_canonical</a>        (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-canonical-strip-fragment" title="gnome_vfs_make_uri_canonical_strip_fragment ()">gnome_vfs_make_uri_canonical_strip_fragment</a>
                                                        (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-path-name-canonical" title="gnome_vfs_make_path_name_canonical ()">gnome_vfs_make_path_name_canonical</a>  (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-input" title="gnome_vfs_make_uri_from_input ()">gnome_vfs_make_uri_from_input</a>       (<em class="parameter"><code>const <span class="type">char</span> *location</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-input-with-dirs" title="gnome_vfs_make_uri_from_input_with_dirs ()">gnome_vfs_make_uri_from_input_with_dirs</a>
                                                        (<em class="parameter"><code>const <span class="type">char</span> *location</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GnomeVFSMakeURIDirs" title="enum GnomeVFSMakeURIDirs"><span class="type">GnomeVFSMakeURIDirs</span></a> dirs</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-shell-arg" title="gnome_vfs_make_uri_from_shell_arg ()">gnome_vfs_make_uri_from_shell_arg</a>   (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-full-from-relative" title="gnome_vfs_make_uri_full_from_relative ()">gnome_vfs_make_uri_full_from_relative</a>
                                                        (<em class="parameter"><code>const <span class="type">char</span> *base_uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *relative_uri</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-expand-initial-tilde" title="gnome_vfs_expand_initial_tilde ()">gnome_vfs_expand_initial_tilde</a>      (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-unescape-string-for-display" title="gnome_vfs_unescape_string_for_display ()">gnome_vfs_unescape_string_for_display</a>
                                                        (<em class="parameter"><code>const <span class="type">char</span> *escaped</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-get-local-path-from-uri" title="gnome_vfs_get_local_path_from_uri ()">gnome_vfs_get_local_path_from_uri</a>   (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-get-uri-from-local-path" title="gnome_vfs_get_uri_from_local_path ()">gnome_vfs_get_uri_from_local_path</a>   (<em class="parameter"><code>const <span class="type">char</span> *local_full_path</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-is-executable-command-string" title="gnome_vfs_is_executable_command_string ()">gnome_vfs_is_executable_command_string</a>
                                                        (<em class="parameter"><code>const <span class="type">char</span> *command_string</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-list-deep-free" title="gnome_vfs_list_deep_free ()">gnome_vfs_list_deep_free</a>            (<em class="parameter"><code><span class="type">GList</span> *list</code></em>);
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="returnvalue">GnomeVFSResult</span></a>      <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-get-volume-free-space" title="gnome_vfs_get_volume_free_space ()">gnome_vfs_get_volume_free_space</a>     (<em class="parameter"><code>const <a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI"><span class="type">GnomeVFSURI</span></a> *vfs_uri</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a> *size</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-icon-path-from-filename" title="gnome_vfs_icon_path_from_filename ()">gnome_vfs_icon_path_from_filename</a>   (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-is-primary-thread" title="gnome_vfs_is_primary_thread ()">gnome_vfs_is_primary_thread</a>         (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-get-uri-scheme" title="gnome_vfs_get_uri_scheme ()">gnome_vfs_get_uri_scheme</a>            (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-uris-match" title="gnome_vfs_uris_match ()">gnome_vfs_uris_match</a>                (<em class="parameter"><code>const <span class="type">char</span> *uri_1</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *uri_2</code></em>);
#define             <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GNOME-VFS-ASSERT-PRIMARY-THREAD:CAPS" title="GNOME_VFS_ASSERT_PRIMARY_THREAD">GNOME_VFS_ASSERT_PRIMARY_THREAD</a>
#define             <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GNOME-VFS-ASSERT-SECONDARY-THREAD:CAPS" title="GNOME_VFS_ASSERT_SECONDARY_THREAD">GNOME_VFS_ASSERT_SECONDARY_THREAD</a>
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="returnvalue">GnomeVFSResult</span></a>      <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-open-fd" title="gnome_vfs_open_fd ()">gnome_vfs_open_fd</a>                   (<em class="parameter"><code><span class="type">GnomeVFSHandle</span> **handle</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> filedes</code></em>);
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="returnvalue">GnomeVFSResult</span></a>      <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-read-entire-file" title="gnome_vfs_read_entire_file ()">gnome_vfs_read_entire_file</a>          (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> *file_size</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **file_contents</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gnome-vfs-2.0-gnome-vfs-utils.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1">
<a name="gnome-vfs-2.0-gnome-vfs-utils.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GnomeVFSMakeURIDirs"></a><h3>enum GnomeVFSMakeURIDirs</h3>
<pre class="programlisting">typedef enum {
	GNOME_VFS_MAKE_URI_DIR_NONE = 0,
	GNOME_VFS_MAKE_URI_DIR_HOMEDIR = 1 &lt;&lt; 0,
	GNOME_VFS_MAKE_URI_DIR_CURRENT = 1 &lt;&lt; 1
} GnomeVFSMakeURIDirs;
</pre>
<p>
Flags that can be passed to <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-input-with-dirs" title="gnome_vfs_make_uri_from_input_with_dirs ()"><code class="function">gnome_vfs_make_uri_from_input_with_dirs()</code></a>.
If the given input might be a relative path it checks for existence of the file
in the directory specified by this flag.
If both flags are passed the current directory is checked first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GNOME-VFS-MAKE-URI-DIR-NONE:CAPS"></a><span class="term"><code class="literal">GNOME_VFS_MAKE_URI_DIR_NONE</code></span></p></td>
<td>Don't check any directory
</td>
</tr>
<tr>
<td><p><a name="GNOME-VFS-MAKE-URI-DIR-HOMEDIR:CAPS"></a><span class="term"><code class="literal">GNOME_VFS_MAKE_URI_DIR_HOMEDIR</code></span></p></td>
<td>Check the home directory
</td>
</tr>
<tr>
<td><p><a name="GNOME-VFS-MAKE-URI-DIR-CURRENT:CAPS"></a><span class="term"><code class="literal">GNOME_VFS_MAKE_URI_DIR_CURRENT</code></span></p></td>
<td>Check the current direcotry
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-format-file-size-for-display"></a><h3>gnome_vfs_format_file_size_for_display ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_format_file_size_for_display
                                                        (<em class="parameter"><code><a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a> size</code></em>);</pre>
<p>
Formats the file <em class="parameter"><code>size</code></em> passed so that it is easy for
the user to read. Gives the size in bytes, kilobytes, megabytes or
gigabytes, choosing whatever is appropriate.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>a <a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a> (a <span class="type">guint64</span> value).
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string with the size ready to be shown.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-format-uri-for-display"></a><h3>gnome_vfs_format_uri_for_display ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_format_uri_for_display    (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);</pre>
<p>
Filter, modify, unescape and change <em class="parameter"><code>uri</code></em> to make it appropriate
for display to users. The conversion is done such that the roundtrip
to UTF-8 is reversible.
</p>
<p>
Rules:
	file: uri without fragments should appear as local paths.
	file: uri with fragments should appear as file:uri.
	All other uri appear as expected.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>uri to be displayed.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string which represents <em class="parameter"><code>uri</code></em> and can be displayed.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-url-show"></a><h3>gnome_vfs_url_show ()</h3>
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="returnvalue">GnomeVFSResult</span></a>      gnome_vfs_url_show                  (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>);</pre>
<p>
Launches the default application or component associated with the given <em class="parameter"><code>url</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
<td>url to be shown.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the default action was launched,
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-ERROR-BAD-PARAMETERS:CAPS"><code class="literal">GNOME_VFS_ERROR_BAD_PARAMETERS</code></a> for an invalid or non-existant <em class="parameter"><code>url</code></em>,
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-ERROR-NO-DEFAULT:CAPS"><code class="literal">GNOME_VFS_ERROR_NO_DEFAULT</code></a> if no default action is associated with the <em class="parameter"><code>url</code></em>.
Also error codes from <a class="link" href="gnome-vfs-2.0-gnome-vfs-mime-database-deprecated.html#gnome-vfs-mime-action-launch" title="gnome_vfs_mime_action_launch ()"><code class="function">gnome_vfs_mime_action_launch()</code></a>
or <a class="link" href="gnome-vfs-2.0-gnome-vfs-mime-database-deprecated.html#gnome-vfs-mime-action-launch-with-env" title="gnome_vfs_mime_action_launch_with_env ()"><code class="function">gnome_vfs_mime_action_launch_with_env()</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-url-show-with-env"></a><h3>gnome_vfs_url_show_with_env ()</h3>
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="returnvalue">GnomeVFSResult</span></a>      gnome_vfs_url_show_with_env         (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **envp</code></em>);</pre>
<p>
Like <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-url-show" title="gnome_vfs_url_show ()"><code class="function">gnome_vfs_url_show()</code></a> except that the default action will be launched
with the given environment.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
<td>url to be shown.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>envp</code></em> :</span></p></td>
<td>environment data.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the default action was launched.
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-ERROR-BAD-PARAMETERS:CAPS"><code class="literal">GNOME_VFS_ERROR_BAD_PARAMETERS</code></a> for an invalid or non-existant <em class="parameter"><code>url</code></em>,
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-ERROR-NO-DEFAULT:CAPS"><code class="literal">GNOME_VFS_ERROR_NO_DEFAULT</code></a> if no default action is associated with the <em class="parameter"><code>url</code></em>.
Also error codes from <a class="link" href="gnome-vfs-2.0-gnome-vfs-mime-database.html#gnome-vfs-mime-application-launch-with-env" title="gnome_vfs_mime_application_launch_with_env ()"><code class="function">gnome_vfs_mime_application_launch_with_env()</code></a>
or <a class="link" href="gnome-vfs-2.0-gnome-vfs-mime-database-deprecated.html#gnome-vfs-mime-action-launch-with-env" title="gnome_vfs_mime_action_launch_with_env ()"><code class="function">gnome_vfs_mime_action_launch_with_env()</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-escape-string"></a><h3>gnome_vfs_escape_string ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_escape_string             (<em class="parameter"><code>const <span class="type">char</span> *string</code></em>);</pre>
<p>
Escapes <em class="parameter"><code>string</code></em>, replacing any and all special characters 
with equivalent escape sequences.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>string to be escaped.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string equivalent to <em class="parameter"><code>string</code></em>
but with all special characters escaped.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-escape-path-string"></a><h3>gnome_vfs_escape_path_string ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_escape_path_string        (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);</pre>
<p>
Escapes <em class="parameter"><code>path</code></em>, replacing only special characters that would not
be found in paths (so '/', '&amp;', and '=' will not be escaped by
this function).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>string to be escaped.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string equivalent to <em class="parameter"><code>path</code></em> but
with non-path characters escaped.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-escape-host-and-path-string"></a><h3>gnome_vfs_escape_host_and_path_string ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_escape_host_and_path_string
                                                        (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);</pre>
<p>
Escapes <em class="parameter"><code>path</code></em>, replacing only special characters that would not
be found in paths or host name (so '/', '&amp;', '=', ':' and '@'
will not be escaped by this function).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>string to be escaped.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string equivalent to <em class="parameter"><code>path</code></em> but
with non-path/host characters escaped.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-escape-slashes"></a><h3>gnome_vfs_escape_slashes ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_escape_slashes            (<em class="parameter"><code>const <span class="type">char</span> *string</code></em>);</pre>
<p>
Escapes only '/' and '%' characters in <em class="parameter"><code>string</code></em>, replacing
them with their escape sequence equivalents.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>string to be escaped.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string equivalent to <em class="parameter"><code>string</code></em>,
but with no unescaped '/' or '%' characters.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-escape-set"></a><h3>gnome_vfs_escape_set ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_escape_set                (<em class="parameter"><code>const <span class="type">char</span> *string</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *match_set</code></em>);</pre>
<p>
Escapes all characters in <em class="parameter"><code>string</code></em> which are listed in <em class="parameter"><code>match_set</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>string to be escaped.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>match_set</code></em> :</span></p></td>
<td>a string containing all characters to be escaped in <em class="parameter"><code>string</code></em>. 
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string equivalent to <em class="parameter"><code>string</code></em> but 
with characters in <em class="parameter"><code>match_string</code></em> escaped.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-unescape-string"></a><h3>gnome_vfs_unescape_string ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_unescape_string           (<em class="parameter"><code>const <span class="type">char</span> *escaped_string</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *illegal_characters</code></em>);</pre>
<p>
Decodes escaped characters (i.e. PERCENTxx sequences) in <em class="parameter"><code>escaped_string</code></em>.
Characters are encoded in PERCENTxy form, where xy is the ASCII hex code 
for character 16x+y.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>escaped_string</code></em> :</span></p></td>
<td>an escaped uri, path, or other string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>illegal_characters</code></em> :</span></p></td>
<td>a string containing a sequence of characters
considered "illegal" to be escaped, '\0' is automatically in this list.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string with the unescaped
equivalents, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>escaped_string</code></em> contained an escaped
encoding of one of the characters in <em class="parameter"><code>illegal_characters</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-make-uri-canonical"></a><h3>gnome_vfs_make_uri_canonical ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_make_uri_canonical        (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);</pre>
<p>
Standardizes the format of the <em class="parameter"><code>uri</code></em>, so that it can be used
later in other functions that expect a canonical uri.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>an absolute or relative stringified uri. It might have scheme.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string that contains the canonical 
representation of <em class="parameter"><code>uri</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-make-uri-canonical-strip-fragment"></a><h3>gnome_vfs_make_uri_canonical_strip_fragment ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_make_uri_canonical_strip_fragment
                                                        (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);</pre>
<p>
Returns a canonicalized uri. If <em class="parameter"><code>uri</code></em> contains a fragment (anything after a '#') strips off that and
then makes the <em class="parameter"><code>uri</code></em> canonical.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI"><span class="type">GnomeVFSURI</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string containing a canonical <em class="parameter"><code>uri</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-make-path-name-canonical"></a><h3>gnome_vfs_make_path_name_canonical ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_make_path_name_canonical  (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);</pre>
<p>
Calls <code class="function">_gnome_vfs_canonicalize_pathname()</code>, allocating storage for the 
result and providing for a cleaner memory management.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>a file path, relative or absolute.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a canonical version of <em class="parameter"><code>path</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-make-uri-from-input"></a><h3>gnome_vfs_make_uri_from_input ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_make_uri_from_input       (<em class="parameter"><code>const <span class="type">char</span> *location</code></em>);</pre>
<p>
Takes a user input path/uri and makes a valid uri out of it.
</p>
<p>
This function is the reverse of <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-format-uri-for-display" title="gnome_vfs_format_uri_for_display ()"><code class="function">gnome_vfs_format_uri_for_display()</code></a>
but it also handles the fact that the user could have typed
arbitrary UTF-8 in the entry showing the string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>location</code></em> :</span></p></td>
<td>a possibly mangled "uri", in UTF-8.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated uri.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-make-uri-from-input-with-dirs"></a><h3>gnome_vfs_make_uri_from_input_with_dirs ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_make_uri_from_input_with_dirs
                                                        (<em class="parameter"><code>const <span class="type">char</span> *location</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GnomeVFSMakeURIDirs" title="enum GnomeVFSMakeURIDirs"><span class="type">GnomeVFSMakeURIDirs</span></a> dirs</code></em>);</pre>
<p>
Determines a fully qualified uri from a relative or absolute input path.
Basically calls <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-input" title="gnome_vfs_make_uri_from_input ()"><code class="function">gnome_vfs_make_uri_from_input()</code></a> except it specifically
tries to support paths relative to the specified directories (can be homedir
and/or current directory). See <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GnomeVFSMakeURIDirs" title="enum GnomeVFSMakeURIDirs"><span class="type">GnomeVFSMakeURIDirs</span></a> for more information.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>location</code></em> :</span></p></td>
<td>a relative or absolute path.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dirs</code></em> :</span></p></td>
<td>directory to use as a base directory if <em class="parameter"><code>location</code></em> is a relative path.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string containing the fully qualified uri.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-make-uri-from-shell-arg"></a><h3>gnome_vfs_make_uri_from_shell_arg ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_make_uri_from_shell_arg   (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);</pre>
<p>
Similar to <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-input" title="gnome_vfs_make_uri_from_input ()"><code class="function">gnome_vfs_make_uri_from_input()</code></a>, except that:
</p>
<p>
1) guesses relative paths instead of http domains.
2) doesn't bother stripping leading/trailing white space.
3) doesn't bother with ~ expansion--that's done by the shell.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>path to make the uri from.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string representing <em class="parameter"><code>uri</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-make-uri-full-from-relative"></a><h3>gnome_vfs_make_uri_full_from_relative ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_make_uri_full_from_relative
                                                        (<em class="parameter"><code>const <span class="type">char</span> *base_uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *relative_uri</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_vfs_make_uri_full_from_relative</code> is deprecated and should not be used in newly-written code. This function is deprecated, please use 
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#gnome-vfs-uri-make-full-from-relative" title="gnome_vfs_uri_make_full_from_relative ()"><code class="function">gnome_vfs_uri_make_full_from_relative()</code></a> from gnome-vfs-uri.h .</p>
</div>
<p>
Returns a string representing the full uri given a full <em class="parameter"><code>base_uri</code></em> and a 
secondary uri which may be relative.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td>
<td>path to use as the base for the full uri.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>relative_uri</code></em> :</span></p></td>
<td>full or relative path to be appended to the <em class="parameter"><code>base_uri</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string containing the uri.
(<a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for some bad errors).

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-expand-initial-tilde"></a><h3>gnome_vfs_expand_initial_tilde ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_expand_initial_tilde      (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);</pre>
<p>
If <em class="parameter"><code>path</code></em> starts with a ~, representing the user's home
directory, expand it to the actual path location.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>a local file path which may start with a '~'.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string with the initial
tilde (if there was one) converted to an actual path.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-unescape-string-for-display"></a><h3>gnome_vfs_unescape_string_for_display ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_unescape_string_for_display
                                                        (<em class="parameter"><code>const <span class="type">char</span> *escaped</code></em>);</pre>
<p>
Similar to gnome_vfs_unescape_string, but it returns something
semi-intelligable to a user even upon receiving traumatic input
such as <code class="literal">00</code> or URIs in bad form.
</p>
<p>
See also: <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-unescape-string" title="gnome_vfs_unescape_string ()"><code class="function">gnome_vfs_unescape_string()</code></a>.
</p>
<p>
WARNING: You should never use this function on a whole URI!  It
unescapes reserved characters, and can result in a mangled URI
that can not be re-entered.  For example, it unescapes "#" "&amp;" and "?",
which have special meanings in URI strings.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>escaped</code></em> :</span></p></td>
<td>a string encoded with escaped sequences.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a pointer to a g_malloc'd string with all characters
replacing their escaped hex values.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-get-local-path-from-uri"></a><h3>gnome_vfs_get_local_path_from_uri ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_get_local_path_from_uri   (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);</pre>
<p>
Create a local path for a file:/// uri. Do not use with uris
of other methods.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>uri to convert to a local path.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string containing the local path.
<a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> is returned on error or if the uri isn't a file: uri
without a fragment identifier (or chained uri).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-get-uri-from-local-path"></a><h3>gnome_vfs_get_uri_from_local_path ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_get_uri_from_local_path   (<em class="parameter"><code>const <span class="type">char</span> *local_full_path</code></em>);</pre>
<p>
Returns a file:/// URI for the local path <em class="parameter"><code>local_full_path</code></em>, 
such as a path provided by <code class="function">gtk_file_chooser_get_filename()</code>.
The resulting URI may be provided, for instance, to <a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#gnome-vfs-uri-new" title="gnome_vfs_uri_new ()"><code class="function">gnome_vfs_uri_new()</code></a>.
</p>
<p>
On Windows <em class="parameter"><code>local_full_path</code></em> should be in the UTF-8 encoding, and can start with a drive
letter, but doesn't have to.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>local_full_path</code></em> :</span></p></td>
<td>a full local filesystem path (i.e. not relative).
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string containing the uri corresponding 
to <em class="parameter"><code>local_full_path</code></em> (<a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for some bad errors).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-is-executable-command-string"></a><h3>gnome_vfs_is_executable_command_string ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gnome_vfs_is_executable_command_string
                                                        (<em class="parameter"><code>const <span class="type">char</span> *command_string</code></em>);</pre>
<p>
Checks if <em class="parameter"><code>command_string</code></em> starts with the full path of an executable file
or an executable in $PATH.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>command_string</code></em> :</span></p></td>
<td>a string representing a command ie "xterm -bg white".
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <code class="literal">TRUE</code> if <em class="parameter"><code>command_string</code></em> started with an executable file, and is in $PATH,
<code class="literal">FALSE</code> otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-list-deep-free"></a><h3>gnome_vfs_list_deep_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gnome_vfs_list_deep_free            (<em class="parameter"><code><span class="type">GList</span> *list</code></em>);</pre>
<p>
Free <em class="parameter"><code>list</code></em> and call <code class="function">g_free()</code> on all data members.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
<td>list to be freed.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-get-volume-free-space"></a><h3>gnome_vfs_get_volume_free_space ()</h3>
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="returnvalue">GnomeVFSResult</span></a>      gnome_vfs_get_volume_free_space     (<em class="parameter"><code>const <a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI"><span class="type">GnomeVFSURI</span></a> *vfs_uri</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a> *size</code></em>);</pre>
<p>
Stores the amount of free space in bytes on <em class="parameter"><code>vfs</code></em>-uri's
volume in <em class="parameter"><code>size</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>vfs_uri</code></em> :</span></p></td>
<td>a <a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI"><span class="type">GnomeVFSURI</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>a <a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> on success, otherwise an
<code class="literal">GNOME_VFS_ERROR_</code>* code.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-icon-path-from-filename"></a><h3>gnome_vfs_icon_path_from_filename ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_icon_path_from_filename   (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>path to a file. Could be relative or absolute path.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns the icon path for the <em class="parameter"><code>filename</code></em>. Example:
gnome_vfs_icon_path_from_filename ("nautilus/nautilus-desktop.png") will return a string 
forming the full path of the file nautilus-desktop.png ie $PREFIX/share/pixmaps/nautilus/nautilus-desktop.png.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-is-primary-thread"></a><h3>gnome_vfs_is_primary_thread ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gnome_vfs_is_primary_thread         (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Check if the current thread is the thread with the main glib event loop.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <code class="literal">TRUE</code> if the current thread is the thread with the 
main glib event loop.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-get-uri-scheme"></a><h3>gnome_vfs_get_uri_scheme ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              gnome_vfs_get_uri_scheme            (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);</pre>
<p>
Retrieve the scheme used in <em class="parameter"><code>uri</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a stringified uri.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string containing the scheme, <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
if <em class="parameter"><code>uri</code></em> doesn't contain a scheme.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-uris-match"></a><h3>gnome_vfs_uris_match ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gnome_vfs_uris_match                (<em class="parameter"><code>const <span class="type">char</span> *uri_1</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *uri_2</code></em>);</pre>
<p>
Compare two uris.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri_1</code></em> :</span></p></td>
<td>stringified uri to compare with <em class="parameter"><code>uri_2</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri_2</code></em> :</span></p></td>
<td>stringified uri to compare with <em class="parameter"><code>uri_1</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <code class="literal">TRUE</code> if they are the same, <code class="literal">FALSE</code> otherwise.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="GNOME-VFS-ASSERT-PRIMARY-THREAD:CAPS"></a><h3>GNOME_VFS_ASSERT_PRIMARY_THREAD</h3>
<pre class="programlisting">#define GNOME_VFS_ASSERT_PRIMARY_THREAD g_assert (gnome_vfs_is_primary_thread())
</pre>
<p>
Asserts that the current thread is the thread with 
the main glib event loop
</p>
</div>
<hr>
<div class="refsect2">
<a name="GNOME-VFS-ASSERT-SECONDARY-THREAD:CAPS"></a><h3>GNOME_VFS_ASSERT_SECONDARY_THREAD</h3>
<pre class="programlisting">#define GNOME_VFS_ASSERT_SECONDARY_THREAD g_assert (!gnome_vfs_is_primary_thread())
</pre>
<p>
Asserts that the current thread is NOT the thread with
the main glib event loop
</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-open-fd"></a><h3>gnome_vfs_open_fd ()</h3>
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="returnvalue">GnomeVFSResult</span></a>      gnome_vfs_open_fd                   (<em class="parameter"><code><span class="type">GnomeVFSHandle</span> **handle</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> filedes</code></em>);</pre>
<p>
Converts an open unix file descript into a GnomeVFSHandle that 
can be used with the normal GnomeVFS file operations. When the
handle is closed the file descriptor will also be closed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
<td>A pointer to a pointer to a GnomeVFSHandle object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filedes</code></em> :</span></p></td>
<td>a UNIX file descriptor
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the open was ok, a suitable error otherwise.

Since 2.2
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-vfs-read-entire-file"></a><h3>gnome_vfs_read_entire_file ()</h3>
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="returnvalue">GnomeVFSResult</span></a>      gnome_vfs_read_entire_file          (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> *file_size</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **file_contents</code></em>);</pre>
<p>
Reads an entire file into memory for convenience. Beware accidentally
loading large files into memory with this function.
</p>
<p>
Since version 2.10 the string stored in <em class="parameter"><code>file_contents</code></em> will be null-terminated,
so for text files you can use result as a normal string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>uri of the file to read.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>file_size</code></em> :</span></p></td>
<td>after reading the file, contains the size of the file read.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>file_contents</code></em> :</span></p></td>
<td>contains the file_size bytes, the contents of the file at <em class="parameter"><code>uri</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> an integer representing the result of the operation.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15.1</div>
</body>
</html>